home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple Reference & Presen…tion Library 4 (Reseller)
/
Apple Ref. & Pres. Lib.v4.0.iso
/
6-Apple⁄DEC Alliance
/
Solutions & Networking Guide
/
Macintosh Networking Guide
/
Macintosh Networking Guide
/
card_23245.txt
< prev
next >
Wrap
Text File
|
1990-04-17
|
18KB
|
800 lines
-- card: 23245 from stack: in
-- bmap block id: 23486
-- flags: 0000
-- background id: 21186
-- name: Chooser
----- HyperTalk script -----
on openCard
global holder,env,sol,NH,service,icons,iconlist,choice
global LH, TS,inc,margin,left, top, right, bottom--for locating
global hich, hiline, sel, fname--for tagging selected to deselect
put "Services Chooser" & return & "select a network service" into fld "Tell"
put "• Select Network Services" into cd fld "services"
if env is "Mac" then
put "Macintosh" into cd fld "env"
else
put env into cd fld "env"
end if
--engine begin
put card field (env && "Network Services") of card "Mac Grid" into holder
if holder is empty
then
put return & "No Solutions Installed In This Version" into fld "Tell"
exit openCard
end if
put "• Select—" & return into cd fld "SolList"
put "" into cd fld "choice"
put "" into cd fld "sentence"
set hilite of btn "Highlight" to false
put cd fld env of cd "LimitNet" into cd fld "SolList"
puticon
parseicon
change2
change
put icons into cd fld "icons"
sub
get the rect of cd field "icons"--this may vary with the field shown
put item 1 of it into left
put item 2 of it into top
put item 3 of it into right
put item 4 of it into bottom
put the textHeight of cd field "icons" into LH
put 60 into TS--•length of character•
put 5 into inc
put 5 into margin
put empty into hich--put empty into select variables
put empty into hiline
put empty into sel
end openCard
on parse
global holder,NH
put empty into NH
repeat with i = 1 to the number of lines of holder
put item 3 of line i of holder into dotnames
repeat
put offset("•",dotnames) into num
if num is empty or num is 0 then exit repeat
put char 1 to (num - 1) of dotnames & return after NH
delete char 1 to num of dotnames
end repeat
end repeat
end parse
on closeCard
global TS,sel,hich,hiline
put 90 into TS
put "" into fld "Tell"
put "" into cd fld "Service"
put empty into cd fld "Sentence"
hide cd fld "SolList"
if sel<>empty then
put sel into character hich of line hiline of cd field "icons"
put empty into sel
end if
end closeCard
on putIcon
global iconList
put empty into iconList
if cd fld "sollist" contains "File Service" then
put "," after iconList
end if
if cd fld "sollist" contains "File Transfer" then
put "." after iconList
end if
if cd fld "sollist" contains "Print Service" then
put "3" after iconList
end if
if cd fld "sollist" contains "Terminal Emulation" then
put "5" after iconList
end if
if cd fld "sollist" contains "Translation" then
put "=" after iconList
end if
if cd fld "sollist" contains "Resource Sharing" then
put "9" after iconList
end if
if cd fld "sollist" contains "Network Management" then
put "1" after iconList
end if
if cd fld "sollist" contains "Mail Service" then
put ";" after iconList
end if
if cd fld "sollist" contains "Programming" then
put "7" after iconList
end if
--if cd fld "sollist" contains "Virtual Disk" then
-- put "?" after iconList
--end if
end putIcon
on parseIcon
global iconlist,icons
put empty into icons
put (length of iconlist)/2 into num
put round of num into num
put 1 into x
repeat with i = 1 to num
put char x of iconlist after icons
put char x + 1 of iconlist & return after icons
put x + 2 into x
end repeat
end parseicon
Function theChar x
global right, left, ts, margin
put empty into chnum
put right-left into temp
put (temp div TS) into int
put left+margin into range1
put range1 + TS into range2
repeat with z=1 to int
if x >= range1 and x< range2
then
put z into chnum
return(chnum)
exit repeat
else
put range2 into range1
put range1 + TS into range2
end if
end repeat
end theChar
on change
global service
if cd fld "sentence" is "," then
put "File Service" into service
end if
if cd fld "sentence" is "." then
put "File Transfer" into service
end if
if cd fld "sentence" is "3" then
put "Print Service" into service
end if
if cd fld "sentence" is "5" then
put "Terminal Emulation" into service
end if
if cd fld "sentence" is "=" then
put "Translation" into service
end if
if cd fld "sentence" is "9" then
put "Resource Sharing" into service
end if
if cd fld "sentence" is "1" then
put "Network Management" into service
end if
if cd fld "sentence" is ";" then
put "Mail Service" into service
end if
if cd fld "sentence" is "7" then
put "Programming" into service
end if
--if cd fld "sentence" is "?" then
-- put "Virtual Disk" into service
--end if
if service is in cd fld "sollist" then
put service into cd fld "choice"
set hilite of btn "Highlight" to true
end if
end change
on change2
global service,choice
if service is "File Service" then
put "," into choice
end if
if service is "File Transfer" then
put "." into choice
end if
if service is "Print Service" then
put "3" into choice
end if
if service is "Terminal Emulation" then
put "5" into choice
end if
if service is "Translation" then
put "=" into choice
end if
if service is "Resource Sharing" then
put "9" into choice
end if
if service is "Network Management" then
put "1" into choice
end if
if service is "Mail Service" then
put ";" into choice
end if
if service is "Programming" then
put "7" into choice
end if
--if service is "Virtual Disk" then
-- put "?" into choice
--end if
if service is in cd fld "sollist" then
put choice into cd fld "sentence"
end if
end change2
on sub
global choice
put chartonum of choice + 1 into temp
put numtochar of temp into inverted
put Substitute(choice, inverted, cd fld "icons") into cd field "icons"
end sub
-- part 43 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=278 top=113 right=130 bottom=488
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 10 (field)
-- low flags: 81
-- high flags: 0001
-- rect: left=279 top=57 right=76 bottom=364
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: env
----- HyperTalk script -----
on mouseUp
show cd btn "envListTitleHiliter"
show cd field "envList"
end mouseUp
On mouseDown
Global ClickSND
play ClickSND
End mouseDown
on mouseEnter
changeCurs 6069
put "Change Environment Button" & return & "click to see choices" into fld "Tell"
end mouseEnter
on mouseLeave
changeCurs 69
put empty into fld "Tell"
end mouseleave
-- part 33 (button)
-- low flags: 00
-- high flags: 4000
-- rect: left=279 top=131 right=150 bottom=487
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: highlight
----- HyperTalk script -----
on mouseUp
set the hilite of me to true
end mouseUp
-- part 11 (field)
-- low flags: 01
-- high flags: 0001
-- rect: left=279 top=83 right=102 bottom=461
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: services
----- HyperTalk script -----
on mouseUp
show cd btn "servicesListHiliter"
show cd field "solList"
end mouseUp
On mouseDown
Global ClickSND
play ClickSND
End mouseDown
on mouseEnter
changeCurs 6069
put "Change Services Button" & return & "click to see choices" into fld "Tell"
end mouseEnter
on mouseLeave
changeCurs 69
put empty into fld "Tell"
end mouseleave
-- part 30 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=44 top=35 right=53 bottom=214
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 31 (field)
-- low flags: 81
-- high flags: 0001
-- rect: left=130 top=0 right=19 bottom=293
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: service
----- HyperTalk script -----
on mouseUp
show cd btn "currentServiceHiliter"
show cd btn "servicesListHiliter"
show cd field "solList"
end mouseUp
on mouseDown
Global ClickSND
play ClickSND
end mouseDown
on mouseEnter
changeCurs 6069
put "Change Service Button" & return & "click to see choices" into fld "Tell"
end mouseEnter
on mouseLeave
changeCurs 69
put empty into fld "Tell"
end mouseleave
-- part 34 (field)
-- low flags: 01
-- high flags: 0007
-- rect: left=44 top=52 right=272 bottom=214
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 202
-- text size: 64
-- style flags: 8192
-- line height: 74
-- part name: Icons
----- HyperTalk script -----
On mouseDown
Global ClickSND
play ClickSND
End mouseDown
on mouseUp
global LH, TS,inc,left, top, right, bottom --set on open card
global hich, hiline,sel,service,choice,icons
set lockscreen to true
get the clickloc
put item 1 of it into x
put item 2 of it into y
--• deselect
if sel<>empty then
put sel into character hich of line hiline of cd field "Icons"
end if
--need to determine where 1st char goes depending on font
--then calculate distance between centers of char
-- from this determine valid select region
--•Locate•
--determines which character in a space free field was clicked on
--NEED CARRIAGE RETURN
put selectionAndHiliter() into lnum
put theChar(x) into chnum
if chnum is empty or lnum is empty
then exit mouseUp
else
put character chnum of line Lnum of cd field "Icons" into Choice
if choice=return or chnum=space
then exit mouseUp
end if
--•select•
put chnum into hich
put lnum into hiLine
put choice into sel
put numtochar(chartonum(sel)+1) into character hich of line hiline of cd field "Icons"
put choice into cd field "sentence"
change
put service into cd fld "Choice"
set lockscreen to true
set cursor to watch
--send openCard to this card
put icons into cd fld "icons"
sub
set cursor to hand
set lockscreen to false
end mouseUp
on mouseEnter
changeCurs 6069
put "Services Options" & return & "click on service to select" into fld "Tell"
end mouseEnter
on mouseLeave
changeCurs 69
put empty into fld "Tell"
end mouseLeave
-- part 5 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=280 top=131 right=149 bottom=486
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 2048
-- line height: 16
-- part name: Choice
----- HyperTalk script -----
on mouseUp
global service
get me
if it is empty
then
put "Choose a Service!" into fld "Tell"
exit mouseUp
else
put it into service
set hilite of btn "Highlight" to true
end if
end mouseUp
On mouseDown
Global ClickSND
play ClickSND
End mouseDown
on mouseEnter
changeCurs 6069
put "Service Chosen Field" & return & "click to return to room" into fld "Tell"
end mouseEnter
on mouseLeave
changeCurs 69
put empty into fld "Tell"
end mouseleave
-- part 35 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=280 top=151 right=210 bottom=350
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 202
-- text size: 64
-- style flags: 8192
-- line height: 76
-- part name: sentence
----- HyperTalk script -----
on mouseEnter
put "Current Service" & return & "click on OK button" into fld "Tell"
end mouseEnter
on mouseLeave
put empty into fld "Tell"
end mouseLeave
-- part 15 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=278 top=102 right=236 bottom=488
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: solList
----- HyperTalk script -----
on mouseUp
global service,choice,icons
put selectionAndHiliter() into cardline
get line cardline of me
if it is "• Select—" or it is empty then
hide cd btn "currentServiceHiliter"
hide cd btn "servicesListHiliter"
hide cd btn "solListHiliter"
hide me
exit mouseUp
else
hide cd btn "currentServiceHiliter"
hide cd btn "servicesListHiliter"
hide cd btn "solListHiliter"
hide me
put line cardline of me into service
put service into cd fld "Service"
put service into cd fld "Choice"
set hilite of btn "Highlight" to true
change2
set cursor to watch
set lockscreen to true
put choice into cd fld "sentence"
put icons into cd fld "icons"
sub
set cursor to hand
set lockscreen to true
end if
end mouseUp
On mouseDown
Global ClickSND
play ClickSND
End mouseDown
on mouseEnter
changeCurs 6069
put "Services Field" & return & "click to choose" into fld "Tell"
end mouseEnter
on mouseLeave
changeCurs 69
put empty into fld "Tell"
end mouseleave
-- part 37 (button)
-- low flags: 80
-- high flags: 4000
-- rect: left=279 top=199 right=215 bottom=487
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: solListHiliter
-- part 38 (button)
-- low flags: 80
-- high flags: 4000
-- rect: left=279 top=83 right=102 bottom=487
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: servicesListHiliter
-- part 39 (button)
-- low flags: 80
-- high flags: 4000
-- rect: left=278 top=55 right=75 bottom=364
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: envListTitleHiliter
-- part 41 (button)
-- low flags: 80
-- high flags: 4000
-- rect: left=127 top=0 right=19 bottom=292
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: currentServiceHiliter
-- part 42 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=215 top=61 right=119 bottom=274
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: iconsHiliter
-- part 14 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=278 top=75 right=225 bottom=364
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: envList
----- HyperTalk script -----
on mouseUp
global env
--∆ Get selection
put selectionAndHiliter() into cardline
get line cardline of me
if it is empty then
hide cd btn "envListHiliter"
hide cd btn "envListTitleHiliter"
hide me
exit mouseUp
else
put line cardline of me into cd fld "env"
put line cardline of me into env
if env is "Macintosh" then put "Mac" into env
end if
set cursor to watch
hide cd btn "envListHiliter"
hide cd btn "envListTitleHiliter"
hide me
send openCard to this card
end mouseUp
on mouseDown
Global ClickSND
play ClickSND
End mouseDown
on mouseEnter
changeCurs 6069
put "Environments Field" & return & "click to see choices" into fld "Tell"
end mouseEnter
on mouseLeave
changeCurs 69
put empty into fld "Tell"
end mouseleave
-- part 40 (button)
-- low flags: 80
-- high flags: 4000
-- rect: left=279 top=107 right=125 bottom=363
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: envListHiliter
-- part 45 (button)
-- low flags: 00
-- high flags: 4000
-- rect: left=0 top=0 right=28 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Title bar
-- part 46 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=12 top=0 right=30 bottom=279
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 156
-- text size: 18
-- style flags: 2048
-- line height: 24
-- part name: FloorName
-- part contents for card part 14
----- text -----
Digital
IBM
Macintosh
PC
Tandem
UNIX
Wang
-- part contents for card part 10
----- text -----
Macintosh
-- part contents for card part 11
----- text -----
• Select Network Services
-- part contents for card part 30
----- text -----
Select a Network Service:
-- part contents for card part 15
----- text -----
File Service
File Transfer
Print Service
Network Management
Mail Service
Terminal Emulation
Development Tools
Translation
Resource Sharing
-- part contents for card part 34
----- text -----
,.
35
=9
1
-- part contents for card part 43
----- text -----
Current Network Service:
-- part contents for card part 46
----- text -----
Network Services Chooser
-- part contents for card part 5
----- text -----
File Service